<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditPneuTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditPneuLabel_perfil}" for="perfil" />
                    <h:selectOneMenu id="perfil" value="#{pneuController.selected.perfil}" title="#{bundle.EditPneuTitle_perfil}" required="true" requiredMessage="#{bundle.EditPneuRequiredMessage_perfil}">
                        <f:selectItems value="#{perfilController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditPneuLabel_aro}" for="aro" />
                    <h:selectOneMenu id="aro" value="#{pneuController.selected.aro}" title="#{bundle.EditPneuTitle_aro}" required="true" requiredMessage="#{bundle.EditPneuRequiredMessage_aro}">
                        <f:selectItems value="#{aroController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditPneuLabel_idProduto}" for="idProduto" />
                    <h:inputText id="idProduto" value="#{pneuController.selected.idProduto}" title="#{bundle.EditPneuTitle_idProduto}" required="true" requiredMessage="#{bundle.EditPneuRequiredMessage_idProduto}"/>
                    <h:outputLabel value="#{bundle.EditPneuLabel_descricao}" for="descricao" />
                    <h:inputText id="descricao" value="#{pneuController.selected.descricao}" title="#{bundle.EditPneuTitle_descricao}" required="true" requiredMessage="#{bundle.EditPneuRequiredMessage_descricao}"/>
                    <h:outputLabel value="#{bundle.EditPneuLabel_precoCompra}" for="precoCompra" />
                    <h:inputText id="precoCompra" value="#{pneuController.selected.precoCompra}" title="#{bundle.EditPneuTitle_precoCompra}" required="true" requiredMessage="#{bundle.EditPneuRequiredMessage_precoCompra}"/>
                    <h:outputLabel value="#{bundle.EditPneuLabel_precoVenda}" for="precoVenda" />
                    <h:inputText id="precoVenda" value="#{pneuController.selected.precoVenda}" title="#{bundle.EditPneuTitle_precoVenda}" required="true" requiredMessage="#{bundle.EditPneuRequiredMessage_precoVenda}"/>
                    <h:outputLabel value="#{bundle.EditPneuLabel_unidadeMedida}" for="unidadeMedida" />
                    <h:selectOneMenu id="unidadeMedida" value="#{pneuController.selected.unidadeMedida}" title="#{bundle.EditPneuTitle_unidadeMedida}" required="true" requiredMessage="#{bundle.EditPneuRequiredMessage_unidadeMedida}">
                        <f:selectItems value="#{unidademedidaController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditPneuLabel_modelo}" for="modelo" />
                    <h:selectOneMenu id="modelo" value="#{pneuController.selected.modelo}" title="#{bundle.EditPneuTitle_modelo}" required="true" requiredMessage="#{bundle.EditPneuRequiredMessage_modelo}">
                        <f:selectItems value="#{modeloController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{pneuController.update}" value="#{bundle.EditPneuSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditPneuViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{pneuController.prepareList}" value="#{bundle.EditPneuShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditPneuIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
